<html>
<head>
    <meta charset="utf-8">
    <script src="../../../../public/javascripts/hidmapa.js"></script>
    <link rel="stylesheet" href="../../../../public/jquery-ui-1.9.2.custom/development-bundle/themes/base/jquery.ui.all.css">
    <script src="../../../../public/jquery-ui-1.9.2.custom/development-bundle/jquery-1.8.3.js"></script>
    <script src="../../../../public/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.core.js"></script>
    <script src="../../../../public/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.widget.js"></script>
    <script src="../../../../public/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.datepicker.js"></script>
    <script src="../../../../public/jquery-ui-1.9.2.custom/development-bundle/ui/jquery.ui.tabs.js"></script>

    <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" />
    <style type="text/css" title="currentStyle">
        @import "../../../../public/DataTables-1.9.4/media/css/demo_page.css";
        @import "../../../../public/DataTables-1.9.4/media/css/demo_table.css";
    </style>
    <script type="text/javascript" language="javascript" src="../../../../public/DataTables-1.9.4/media/js/jquery.dataTables.js"></script>
    <link rel="stylesheet" href="../../../../public/jquery-ui-1.9.2.custom/development-bundle/demos/demos.css" >

    <script type="text/javascript" language="javascript" src="../../../../public/javascripts/chartregistros.js"></script>

    <script>

        $(function() {
            $( "#registro_regfech" ).datepicker({
                changeMonth: true,
                changeYear: true,
                dateFormat: 'yy-mm-dd',
                minDate: new Date(1950, 10 - 1, 25)
            });
        });

        $(function() {
            $( "#tabs" ).tabs({
                beforeLoad: function( event, ui ) {
                    ui.jqXHR.error(function() {
                        ui.panel.html(
                                "Couldn't load this tab. We'll try to fix this as soon as possible. " +
                                        "If this wouldn't be a demo." );
                    });
                }
            });
        });

        function CambiarHaciaTabAgregar()
        {
            $("#tabs").tabs("select", "#tabs-3");
            //document.formReg.submit();
            document.getElementById("reg").value = "hola";
        }

        function CambiarHaciaTabCargarRegistros()
        {
            $("#tabs").tabs("select", "#tabs-4");
        }

        $(document).ready(function() {
            $('#registros').dataTable( {
                "bPaginate": true,
                "bLengthChange": true,
                "bFilter": false,
                "bSort": true,
                "bInfo": true,
                "bAutoWidth": true,
                "oLanguage": {
                    "sLengthMenu": "Mostrar _MENU_ registros por pagina",
                    "sZeroRecords": "No hay resultados - Lo sentimos",
                    "sInfo": "Mostrando _START_ a _END_ de _TOTAL_ registros",
                    "sInfoEmpty": "Mostrando 0 a 0 de 0 registros",
                    "sInfoFiltered": "(filtrado de _MAX_ registros totales)"
                },
                "sScrollY": 290,
                "sPaginationType": "full_numbers",
                "aLengthMenu": [[10, 25, 50], [10, 25, 50]]
            } );
        } );


    </script>

</head>
<body
    #{if hidregistro != null || errorsRegistro != ""}
        onload="CambiarHaciaTabAgregar()"
    #{/if}>

<div id="tabs">
    <ul>
        <li><a href="#tabs-1">Tablas de registros</a></li>
        <li><a onclick="plotear('registrosFechaValor','contenedor')" href="#tabs-2">Visualizacion grafica de registros</a></li>
        <li><a href="#tabs-3">Nuevo registro</a></li>
        <li><a href="#tabs-4">Cargar registros desde Fichero</a></li>
    </ul>
    <div id="tabs-1">
        #{include 'GestionDataHistorica/GestorDataHistorica/AgregarRegistro.html' /}
    </div>
    <div id="tabs-2">
        #{include 'GestionDataHistorica/GestorDataHistorica/VisualizarRegistro.html' /}
    </div>
    <div id="tabs-3">
        #{include 'GestionDataHistorica/GestorDataHistorica/NuevoRegistro.html' /}
    </div>
    <div id="tabs-4">
        #{include 'GestionDataHistorica/GestorDataHistorica/CargarRegistros.html' /}
    </div>
</div>
</body>
</html>



